<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Zarządzaj stronami</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/resources/templatemo_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div id="templatemo_container_wrapper">
		<div class="templatemo_spacer"></div>
		<div id="templatemo_container">

			<jsp:include page="admin-included/top.jsp" />

			<div id="templatemo_left_column">
				<div class="text_area" align="justify">
					<div class="title">Panel zarządzania stronami</div>
					This free CSS template is provided by <a href="http://www.templatemo.com" target="_parent">templatemo.com</a>. Feel free to download, modify and use this
					layout for your websites. It would be helpful if you put a kind of credit link back to <a href="http://www.templatemo.com" target="_parent">templatemo.com</a>
					website. Thank you.<br /> <br /> Proin vel libero id erat venenatis accumsan. Nunc blandit orci sit amet risus. Lorem ipsum dolor sit amet, consectetuer
					adipiscing elit. Pellentesque dolor nulla, congue vitae, fringilla in, varius a, orci. Mauris convallis. <br /> <br />
					<table>
						<tr>
							<th style="width: 20px">Id</th>
							<th style="width: 40px">Aktywna</th>
							<th style="width: 300px">Nazwa</th>
							<th style="width: 40px">Edytuj</th>
							<th style="width: 40px">Usuń</th>
						</tr>
						<c:forEach var="page" items="${model.pages}">
							<tr>
								<td>${page.id}</td>
								<td>
								<c:if test="${page.active}"> 
									<img src="/resources/icons/check.png" />
								</c:if>
								</td>
								<td><a href="/show-page?page-id=${page.id}">${page.title}</a></td>
								<td><a href="/admin/edit-page?page-id=${page.id}"><img src="/resources/icons/edit.png" /></a></td>
								<td><a href="/admin/delete-page?page-id=${page.id}"><img src="/resources/icons/delete.png" /></a></td>
							</tr>
						</c:forEach>
					</table>
				</div>
			</div>

			<jsp:include page="admin-included/sideMenu.jsp" />

			<jsp:include page="admin-included/footer.jsp" />
		</div>
		<div class="templatemo_spacer"></div>
	</div>
</body>
</html>